package com.acmen.easyapi.model;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author acmen
 * 接口应用
 */
public class App {
    /**
     * 端口
     */
    private String id;
    /**
     * 应用名
     */
    private String name;
    private String route;
    private String note;
    private Integer port;
    /**
     * 接口列表
     */
    private List<Api> apis;
    /**
     * 数据校验器说明
     */
    private List<String> validatorNotes = new ArrayList<>();
    /**
     * 数据获取器说明
     */
    private List<String> dataGeneratorNotes = new ArrayList<>();
    /**
     * 更新时间
     */
    private LocalDateTime updateDt;

    private List<Dictionary> responseCodes;//公共代码说明

    public App() {
    }

    public App(String name,Integer port,String route,String note, List<Api> apis) {
        this.name = name;
        this.port = port;
        this.route = route;
        this.note = note;
        this.apis = apis;
        updateDt = LocalDateTime.now();
    }

    public String getId() {
        return id;
    }

    public App setId(String id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public App setName(String name) {
        this.name = name;
        return this;
    }

    public String getNote() {
        return note;
    }

    public App setNote(String note) {
        this.note = note;
        return this;
    }

    public List<Api> getApis() {
        return apis;
    }

    public App setApis(List<Api> apis) {
        this.apis = apis;
        return this;
    }

    public List<String> getValidatorNotes() {
        return validatorNotes;
    }

    public App setValidatorNotes(List<String> validatorNotes) {
        this.validatorNotes = validatorNotes;
        return this;
    }

    public List<String> getDataGeneratorNotes() {
        return dataGeneratorNotes;
    }

    public App setDataGeneratorNotes(List<String> dataGeneratorNotes) {
        this.dataGeneratorNotes = dataGeneratorNotes;
        return this;
    }

    public LocalDateTime getUpdateDt() {
        return updateDt;
    }

    public App setUpdateDt(LocalDateTime updateDt) {
        this.updateDt = updateDt;
        return this;
    }

    public List<Dictionary> getResponseCodes() {
        return responseCodes;
    }

    public App setResponseCodes(List<Dictionary> responseCodes) {
        this.responseCodes = responseCodes;
        return this;
    }

    public String getRoute() {
        return route;
    }

    public void setRoute(String route) {
        this.route = route;
    }

    public Integer getPort() {
        return port;
    }

    public App setPort(Integer port) {
        this.port = port;
        return this;
    }
}

